﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Login</title>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />

    
    <script src="__PUBLIC__/scripts/boot.js" type="text/javascript"></script>
    
</head>
<body >   
<div id="loginWindow" class="mini-window" title="用户登录" style="width:350px;height:180px;" 
   showModal="true" showCloseButton="false"
    >

    <div id="loginForm" style="padding:15px;padding-top:10px;">
    	<form id="login-form" action="__URL__/home" method="post">
        <table >
            <tr>
                <td style="width:60px;"><label for="username$text">帐号：</label></td>
                <td>
                    <input id="username" name="username"  class="mini-textbox" required="true" style="width:150px;"/>
            
                </td>    
            </tr>
            <tr>
                <td style="width:60px;"><label for="password$text">密码：</label></td>
                <td>
                    <input id="password" name="password"  class="mini-password" requiredErrorText="密码不能为空" required="true" style="width:150px;" onenter="onLoginClick"/>
                  
                </td>
            </tr>            
            <tr>
                <td></td>
                <td style="padding-top:5px;">
                	<input onclick="onLoginClick()" value="登录" type="submit" style="width:60px;" />
                   	<input  value="重置" type="reset" style="width:60px;" />                 
                </td>
            </tr>
            <tr>
            	<td></td>
            	<td> <a href=mailto:hyhyxu@gmail.com >忘记密码？</a>
            		&nbsp;&nbsp;&nbsp;&nbsp;<a href="__APP__/User/regedit/" >注册用户</a></td>
            </tr>
        </table>
        </form>
    </div>

</div>


    

    
    <script type="text/javascript">
        mini.parse();

        var loginWindow = mini.get("loginWindow");
        loginWindow.show();

        window.onresize = function () {
            loginWindow.show();
        }

        function onLoginClick(e) {
            var form = new mini.Form("#loginWindow");

            form.validate();
            if (form.isValid() == false) return;
	
            loginWindow.hide();
            mini.loading("登录成功，马上转到系统...", "登录成功");
            setTimeout(function () {
               
            }, 1500);
        }
        function onResetClick(e) {
            var form = new mini.Form("#loginWindow");
            form.clear();
        }
        /////////////////////////////////////
        function isEmail(s) {
            if (s.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) != -1)
                return true;
            else
                return false;
        }
        function onUserNameValidation(e) {
            if (e.isValid) {
                if (isEmail(e.value) == false) {
                    e.errorText = "必须输入邮件地址";
                    e.isValid = false;
                }
            }
        }
        function onPwdValidation(e) {
            if (e.isValid) {
                if (e.value.length < 5) {
                    e.errorText = "密码不能少于5个字符";
                    e.isValid = false;
                }
            }
        }
    </script>

</body>
</html>